package cn.uil.demo2;

import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
@AsyncInit // 标记为异步初始化
public class HeavyService2 {
    @PostConstruct
    public void init() throws InterruptedException {
        Thread.sleep(5000); // 模拟耗时操作
        System.out.println("HeavyService2 initialized!");
    }
}
